package com.ie.cloud.payment.exception;

import com.ie.cloud.payment.constants.BizStatus;
import lombok.Getter;
import lombok.Setter;

/**
 * Created with FR
 * @Author: DQ
 * @Date: 2025/07/17/15:30
 * @Description: 描述语句
 */
@Setter
@Getter
public class BizException extends RuntimeException{

    private String message;
    @Getter
    private int code;


    public BizException(BizStatus errorCode){
        super();
        this.code = errorCode.getCode();
        this.message = errorCode.getMsg();
    }

    public BizException(int errorCode, String message){
        super();
        this.code = errorCode;
        this.message = message;
    }

    public BizException(String message){
        super();
        this.code = BizStatus.INTERNAL_ERROR.getCode();
        this.message = message;
    }


}
